package com.purchase.ml.bean.req.prod;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.purchase.ml.consts.Constants;
import com.purchase.ml.entity.prod.SysCategory;
import com.purchase.ml.entity.prod.SysProduct;
import com.purchase.ml.entity.prod.SysProductPic;
import com.purchase.ml.entity.prod.SysProductSku;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * @author :zxm
 * @date :2021/2/25 18:43
 * @description :some description
 **/
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "商品新增model")
public class SysProdNewDto extends SysProduct implements Serializable { //todo：main: 继承对象只能是PageDto或者不继承

    private Date createdAt; //todo：无需参数
    private Long productId;//todo：无需参数
    private Integer state = Constants.NORMAL_STATE;
    /**
     * 品类ID
     */
    @ApiModelProperty(value = "品类ID",required = true)
    @NotNull(message = "Kategori tidak boleh kosong")
    private Long categoryId;

    /**
     * 产品名称
     */
    @ApiModelProperty(value = "产品名称",required = true)
    @NotBlank(message = "Nama Produk tidak boleh kosong")
    private String productName;
    /**
     * 产品描述
     */
    @ApiModelProperty(value = "产品描述",required = true)
    @NotBlank(message = "Penerangan produk tidak boleh kosong")
    private String description;
    /**
     * 品牌
     */
    @ApiModelProperty(value = "品牌",required = true)
    @NotBlank(message = "Jenama tidak boleh kosong")
    private String brand;

    /**
     * 产品型号
     */
    @ApiModelProperty(value = "产品型号",required = true)
    @NotBlank(message = "Model tidak boleh kosong")
    private String productModel;

    /**
     * 成本
     */
    @ApiModelProperty(value = "成本",required = true)
    @NotNull(message = "Harga kos tidak boleh kosong")
    private BigDecimal priceCost;

    /**
     * 主经销商价格
     */
    @ApiModelProperty(value = "主经销商价格",required = true)
    @NotNull(message = "Harga dealer utama tidak boleh kosong")
    private BigDecimal priceMasterDealer;

    /**
     * 经销商价格
     */
    @ApiModelProperty(value = "经销商价格",required = true)
    @NotNull(message = "Harga dealer tidak boleh kosong")
    private BigDecimal priceDealer;



    @ApiModelProperty(value = "商品Sku数据包",required = true)
    @NotNull(message = "SKU produk tidak boleh kosong")
    private SysProductSku skuDate;

    @ApiModelProperty(value = "商品图片",required = true)
    @NotEmpty(message = "Gambar produk tidak boleh kosong")
    private List<SysProductPic> picDate;

    private static final long serialVersionUID = 1L;
}